<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<title></title>
	</head>

	<body>
	</body>

</html>
<script>
	function fn(num) {
		var n1 = 0;
		var n2 = 1;
		var n3;
		if (num<2) {
			return 1;
		}
		for (var i = 3; i <= num; i++) {
			n3 = n1 + n2;
			n1 = n2
			n2 = n3
		}
		return n3;
	}
	console.log(fn(20))
</script>